import pymysql

connect = pymysql.connect(host="localhost",port=3306,user="root",passwd="57830716",db="xs",charset="utf8")
cur = connect.cursor()

def getInstanct():
    return connect

def exec(sql):
    cur.execute(sql)
    connect.commit()

def query(sql):
    cur.execute(sql)
    return cur

def close():
    cur.close()
    connect.close()
